

add_definitions(
-Dtoluapp_EXPORTS
-D_CRT_SECURE_NO_WARNINGS
)

file(GLOB FIND_SRC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.c")
list(APPEND SOURCES ${FIND_SRC})

file(GLOB FIND_SRC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.h")
list(APPEND SOURCES ${FIND_SRC})


add_library(tolua++ SHARED ${SOURCES})
target_link_libraries(tolua++ lua51mt)

set_target_properties(tolua++ PROPERTIES FOLDER BaseLib)
install (TARGETS tolua++ RUNTIME DESTINATION ${INSTALL_DIR})
install(TARGETS tolua++ ARCHIVE DESTINATION ${INSTALL_DIR}/Lib)
file(COPY tolua++.h DESTINATION ${INSTALL_DIR}/Include )
